using System;
using System.Collections.Generic;
using System.Text;

namespace MVCFramework
{
    /// <summary>
    /// if decorates a property then the property value will be 
    /// added to model if is IModelData or the object property reference will
    /// recursively be checked for ModelContainer decorated properties.
    /// </summary>
    /// 
    [AttributeUsage(AttributeTargets.Property | AttributeTargets .Class )]
    public class ModelContainmentAttribute : Attribute
    {
        bool include;
        public bool CheckDeepContainment
        {
            get { return include; }
            set { include = value; }
        }

        public ModelContainmentAttribute()
        {
        }

        public IList<MVCFramework.Models.Controllers.IController> _controllers;
        public IList<string> _propertiesToInvoke;


        public ModelContainmentAttribute(bool inheritance)
        {
            this.include = inheritance ;
        }
        public ModelContainmentAttribute(bool inheritance,IList<MVCFramework.Models.Controllers.IController> _controllers)
        {
            this.include = inheritance;
            this._controllers = _controllers;
        }
        public ModelContainmentAttribute(bool inheritance , IList <string > properies)
        {
            this._propertiesToInvoke = properies;
            this.include = inheritance;
        }
    }
}
